<script id="action-button" type="text/template">
	<div class="btn-group">
		<a href="<!--helper {'action-query-href'}-->" class="btn btn-default <!--if{action=='basics'}-->active<!--/if-->">基础信息</a>
		<a href="<!--helper {'action-query-href'('license')}-->" class="btn btn-default <!--if{action=='license'}-->active<!--/if-->">营业执照</a>
		<a href="<!--helper {'action-query-href'('image')}-->" class="btn btn-default <!--if{action=='image'}-->active<!--/if-->">展示图片</a>
		<a href="<!--helper {'action-query-href'('type')}-->" class="btn btn-default <!--if{action=='type'}-->active<!--/if-->">商家分类</a>
		<a href="<!--helper {'action-query-href'('config')}-->" class="btn btn-default <!--if{action=='config'}-->active<!--/if-->">配置信息</a>
	</div>
</script>

<script id="content" type="text/template">
	<!--helper{'action-button'}-->
	<br/><br/>
	<div class="form-group">
    	<label>商家ID：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_id}-->">
  	</div>
  	<div class="form-group">
    	<label>创建时间：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_insert_time) * 1000)}-->">
  	</div>
  	<div class="form-group">
    	<label>商家名称：</label>
    	<input type="text" class="form-control" placeholder="商家的名称" name="merchant_name" value="<!--{response.get.merchant_name}-->">
  	</div>
  	<div class="form-group">
    	<label>商家介绍：</label>
    	<textarea class="form-control" rows="3" placeholder="商家的介绍" name="merchant_info"><!--{response.get.merchant_info}--></textarea>
  	</div>
	
  	  	
  	<hr/>
  	<div class="form-group">
	  	<label style="display: block;">商家LOGO：</label>
	  	<input name="image-files" type="file" style="left:-99999px;position:absolute;"/>
	  	<div class="btn-group">
			<button type="button" class="btn btn-default" name="image-select">选择图片</button>
			<button type="button" class="btn btn-info" name="logo-image-submit">确定上传</button>
		</div>
	  	<br/><br/>
	  	<div>
	  		<img class="image-look" src="" name="image-show" style="max-height: 100px; cursor: pointer;display: none;">
	  		<!--if{response.get.merchant_logo_image_id}-->
	  		<img class="image-look" src="<!--{response.application_config.qiniu_domain+response.get.merchant_logo_image_id}-->" data-width="<!--{response.get.merchant_logo_image_width}-->" data-height="<!--{response.get.merchant_logo_image_height}-->" style="max-height: 100px; cursor: pointer;">
	  		<!--else-->
	  		<span style="color: #999999;">无LOGO图片</span>
	  		<!--/if-->
	  	</div>
  	</div>
  	<hr/>
  	
  	<div class="form-group">
    	<label>状态：</label>
	  	<select class="form-control" name="merchant_state">
		  <option value="0" <!--if{response.get.merchant_state == "0"}-->selected="selected"<!--/if--> >认证失败</option>
		  <option value="1" <!--if{response.get.merchant_state == "1"}-->selected="selected"<!--/if--> >已认证</option>
		  <option value="2" <!--if{response.get.merchant_state == "2"}-->selected="selected"<!--/if--> >等待审核</option>
		  <option value="3" <!--if{response.get.merchant_state == "3"}-->selected="selected"<!--/if--> >编辑中</option>
		</select>
  	</div>
  	<hr/>
  	<div class="form-group">
    	<label>商家手机号：</label>
    	<input type="text" class="form-control" placeholder="手机号" name="merchant_phone" value="<!--{response.get.merchant_phone}-->">
		</div>
		<!--if{!applicationCheckMuYingShangCheng}-->
  	<div class="form-group" >
    	<label>商家电话：</label>
    	<input type="text" class="form-control" placeholder="电话" name="merchant_tel" value="<!--{response.get.merchant_tel}-->">
		</div>
		<!--/if-->
		<!--if{!applicationCheckMuYingShangCheng}-->
  	<div class="form-group">
    	<label>商家电子邮箱：</label>
    	<input type="text" class="form-control" placeholder="电子邮箱" name="merchant_email" value="<!--{response.get.merchant_email}-->">
		</div>
		<!--/if-->
  	<hr/>
  	
  	
  	<div class="form-group">
    	<label>省份：</label>
    	<input type="text" class="form-control" placeholder="省份" name="merchant_province" value="<!--{response.get.merchant_province}-->">
  	</div>
  	<div class="form-group">
    	<label>市：</label>
    	<input type="text" class="form-control" placeholder="市" name="merchant_city" value="<!--{response.get.merchant_city}-->">
  	</div>
  	<div class="form-group">
    	<label>区：</label>
    	<input type="text" class="form-control" placeholder="区" name="merchant_district" value="<!--{response.get.merchant_district}-->">
  	</div>
  	
  	<div class="form-group">
    	<label>地址：</label>
    	<input type="text" class="form-control" placeholder="地址" name="merchant_address" value="<!--{response.get.merchant_address}-->">
  	</div>
  	<div class="form-group">
    	<label>经度：</label>
    	<input type="text" class="form-control" placeholder="经度" name="merchant_longitude" value="<!--{response.get.merchant_longitude}-->">
  	</div>
  	<div class="form-group">
    	<label>纬度：</label>
    	<input type="text" class="form-control" placeholder="经度" name="merchant_latitude" value="<!--{response.get.merchant_latitude}-->" >
  	</div>
  	<div class="form-group">
    	<label>关于拾取经纬度的方法：</label>
    	<div>
    		<a href="https://lbs.qq.com/tool/getpoint/" target="_blank">腾讯位置服务-坐标拾取器[纬度,经度]</a>
    	</div>
  	</div>
  	
  	<br/>
  	<div class="alert alert-warning alert-dismissible" role="alert">
	  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	  <strong>注意!</strong> 这里确定编辑只是提交文本数据，而图片在确定上传的时候已经被提交。
	</div>
  	<button type="button" class="btn btn-primary" name="submit">确定编辑</button>
	<hr/>
	<span style="color: #999999;">更新时间：<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_update_time) * 1000)}--></span>
	<div style="height: 100px;"></div>
</script>

<script id="license-content" type="text/template">
	<!--helper{'action-button'}-->
	<br/><br/>
	
	<div class="form-group">
    	<label>商家ID：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_id}-->">
  	</div>
  	<div class="form-group">
    	<label>创建时间：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_insert_time) * 1000)}-->">
  	</div>
	<div class="form-group">
    	<label>商家名称：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_name}-->">
  	</div>
	
  	<hr/>
  	<div class="form-group">
	  	<label style="display: block;">商家营业执照：</label>
	  	<input name="license-image-files" type="file" style="left:-99999px;position:absolute;"/>
	  	<div class="btn-group">
			<button type="button" class="btn btn-default" name="license-image-select">选择图片</button>
			<button type="button" class="btn btn-info" name="license-image-submit">确定上传</button>
		</div>
	  	<br/><br/>
	  	<div>
	  		<img class="image-look" src="" name="license-image-show" style="max-height: 100px; cursor: pointer;display: none;">
	  		<!--if{response.get.merchant_license_image_id}-->
	  		<img class="image-look" src="<!--{response.application_config.qiniu_domain+response.get.merchant_license_image_id}-->" data-width="<!--{response.get.merchant_license_image_width}-->" data-height="<!--{response.get.merchant_license_image_height}-->" style="max-height: 100px; cursor: pointer;">
	  		<!--else-->
	  		<span style="color: #999999;">营业执照未设置</span>
	  		<!--/if-->
	  	</div>
  	</div>
  	<hr/>
  	<!--if{!applicationCheckMuYingShangCheng}-->
  	<div class="form-group">
    	<label>公司名称：</label>
    	<input type="text" class="form-control" placeholder="营业执照的名称，公司名称" name="merchant_license_name" value="<!--{response.get.merchant_license_name}-->">
  	</div>
  	<div class="form-group">
    	<label>注册号/统一社会信用代码：</label>
    	<input type="text" class="form-control" placeholder="注册号/统一社会信用代码" name="merchant_license_number" value="<!--{response.get.merchant_license_number}-->">
  	</div>
  	<div class="form-group">
    	<label>公司地址：</label>
    	<input type="text" class="form-control" placeholder="营业执照的住所地址" name="merchant_license_address" value="<!--{response.get.merchant_license_address}-->">
  	</div>
  	<div class="form-group">
    	<label>法定代表人/经营者：</label>
    	<input type="text" class="form-control" placeholder="营业执照的法定代表人/经营者" name="merchant_license_operator" value="<!--{response.get.merchant_license_operator}-->">
  	</div>
	
	
	<br/>
  	<div class="alert alert-warning alert-dismissible" role="alert">
	  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	  <strong>注意!</strong> 这里确定编辑只是提交文本数据，而图片在确定上传的时候已经被提交。
	</div>
		<button type="button" class="btn btn-primary" name="license-submit">确定编辑</button>
	<!--/if-->
	<hr/>
	<span style="color: #999999;">更新时间：<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_update_time) * 1000)}--></span>
	<div style="height: 100px;"></div>
</script>


<script id="image-content" type="text/template">
	<!--helper{'action-button'}-->
	<br/><br/>
	
	<div class="form-group">
    	<label>商家ID：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_id}-->">
  	</div>
  	<div class="form-group">
    	<label>创建时间：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_insert_time) * 1000)}-->">
  	</div>
	<div class="form-group">
    	<label>商家名称：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_name}-->">
  	</div>
  	<hr/>
  	<button type="button" class="btn btn-default"  name="image-add-input"><span class="glyphicon glyphicon-plus"></span> 添加图片</button>
  	<button class="btn btn-default" type="button" action-button="name"><span class="glyphicon glyphicon-pencil"></span> 更新名称</button>
	<button class="btn btn-default" type="button" action-button="sort"><span class="glyphicon glyphicon-sort"></span> 排序</button>
	<button class="btn btn-danger" type="button" action-button="remove"><span class="glyphicon glyphicon-trash"></span> 删除</button>
  	
  	<hr/>
	<table class="table table-striped">
      <thead>
        <tr>
          <th><input type="checkbox" action-table="checkbox-all"></th>	
          <th>#</th>
          <th>缩略图</th>
          <th>
          	<!--if{http().anchor.query.sort == "name_desc"}-->
          	<a href="javascript:;" action-sort="name_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>名称</a>
          	<!--elseif{http().anchor.query.sort == "name_asc"}-->
          	<a href="javascript:;" action-sort="name_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>名称</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="name_desc">名称</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "type_desc"}-->
          	<a href="javascript:;" action-sort="type_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>类型</a>
          	<!--elseif{http().anchor.query.sort == "type_asc"}-->
          	<a href="javascript:;" action-sort="type_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>类型</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="type_desc">类型</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "size_desc"}-->
          	<a href="javascript:;" action-sort="size_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>大小</a>
          	<!--elseif{http().anchor.query.sort == "size_asc"}-->
          	<a href="javascript:;" action-sort="size_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>大小</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="size_desc">大小</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "sort_desc"}-->
          	<a href="javascript:;" action-sort="sort_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>排序</a>
          	<!--elseif{http().anchor.query.sort == "sort_asc"}-->
          	<a href="javascript:;" action-sort="sort_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>排序</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="sort_desc">排序</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "state_desc"}-->
          	<a href="javascript:;" action-sort="state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>状态</a>
          	<!--elseif{http().anchor.query.sort == "state_asc"}-->
          	<a href="javascript:;" action-sort="state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="state_desc">状态</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "update_time_desc"}-->
          	<a href="javascript:;" action-sort="update_time_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>更新时间</a>
          	<!--elseif{http().anchor.query.sort == "update_time_asc"}-->
          	<a href="javascript:;" action-sort="update_time_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>更新时间</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="update_time_desc">更新时间</a>
          	<!--/if-->
          </th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      	<!--if{response.list.data.length}-->
      	<!--for{var i in response.list.data}-->
      	<tr>
          <th><input type="checkbox" action-table="checkbox" data-id="<!--{response.list.data[i].merchant_image_id}-->"></th>
          <td><!--{parseInt(i)+1+((parseInt(response.list.page_now) - 1) * response.list.page_size)}--></td>
          <td>
          	<img class="image-look" src="<!--{response.application_config.qiniu_domain+response.list.data[i].image_id+'?imageView2/0/w/400'}-->" data-src="<!--{response.application_config.qiniu_domain+response.list.data[i].image_id+'?imageView2/0/w/1200'}-->" data-width="<!--{response.list.data[i].image_width}-->" data-height="<!--{response.list.data[i].image_height}-->" style="height: 50px;cursor: pointer;" />
          </td>
          <td style="min-width: 250px;">
          	<div class="input-group">
				<input type="text" class="form-control" placeholder="名称" action-table="name" data-id="<!--{response.list.data[i].merchant_image_id}-->" value="<!--{response.list.data[i].image_name}-->">
				<span class="input-group-addon">.<!--{response.list.data[i].image_format}--></span>
			</div>
          </td>
          <td><!--{response.list.data[i].image_type}--></td>
          <td><!--{WangAho().byte_convert(response.list.data[i].image_size)}--></td>
          <td><input type="text" class="form-control" placeholder="排序" style="max-width: 100px;" action-table="sort" data-id="<!--{response.list.data[i].merchant_image_id}-->" value="<!--{response.list.data[i].image_sort}-->"></td>
          <td>
          <!--if{parseInt(response.list.data[i].image_state)}-->
          <span class="label label-success">信息正常</span>
          <!--else-->
          <span class="label label-danger">信息不全</span>
          <!--/if-->
          </td>
          <td><!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.list.data[i].image_update_time) * 1000)}--></td>
          <td>
          	<a href="<!--{response.application_config.qiniu_domain+response.list.data[i].image_id+'?name='+response.list.data[i].image_name+'.'+response.list.data[i].image_format}-->" target="_blank" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-share-alt"></span> 访问资源</a>
          	<a href="<!--{response.application_config.qiniu_domain+response.list.data[i].image_id+'?attname='+response.list.data[i].image_name+'.'+response.list.data[i].image_format}-->" target="_blank" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-download-alt"></span> 下载资源</a>
          </td>
        </tr>
        <!--/for-->
      	<!--else-->
        <tr>
          <td colspan="10" align="center">无数据</td>
        </tr>
        <!--/if-->
      </tbody>
    </table>
	
	<!--if{response.list.data.length}-->
	<div class="paging" style="text-align: center;">
		<button class="first btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="1" type="button">首页</button>
		<button class="previous btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="<!--{parseInt(response.list.page_now) - 1}-->" type="button">上一页</button>
		<button class="btn btn-default" type="button">
			第<!--{response.list.page_now}-->页
			/ 共<!--{response.list.page_count}-->页
			/ 有<!--{response.list.row_count}-->条数据</button>
		<button class="next btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{parseInt(response.list.page_now) + 1}-->">下一页</button>
		<button class="end btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{response.list.page_count}-->">尾页</button>
	</div>
	<div class="form-inline" style="text-align: center;margin-top: 10px;">
		<div class="form-group">
			<input type="text" class="form-control paging--value" placeholder="输入跳转页" style="width: 100px;">
		</div>
		<button type="button" class="btn btn-default paging--submit">跳转</button>
	</div>
	<!--/if-->
  	
  	
	<hr/>
	<span style="color: #999999;">更新时间：<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_update_time) * 1000)}--></span>
	<div style="height: 100px;"></div>
</script>


<script id="image-add-button" type="text/template">
<div style="padding: 10px;height: 100%;">
	<input name="image-files" type="file" multiple="multiple" style="left:-99999px;position:absolute;"/>
	<button type="button" class="btn btn-default" name="image-select"><span class="glyphicon glyphicon-plus"></span> 选择文件</button>
	<button type="button" class="btn btn-default" name="image-clear"><span class="glyphicon glyphicon-repeat"></span> 清理</button>
	<button type="button" class="btn btn-primary" name="image-submit"><span class="glyphicon glyphicon-floppy-open"></span> 上传</button>
  	<hr/>
	<div name="image-upload-list">
	</div>
</div>	
</script>

<script id="image-add-content" type="text/template">
	<table class="table" style="margin-bottom: 0;">
      <thead>
        <tr>
          <th>#</th>
          <th>缩略图</th>
          <th>文件名称</th>
          <th>文件类型</th>
          <th>文件大小</th>
          <th>上传进度</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      	<!--if{list.length}-->
      	<!--for{var i in list}-->
        <tr>
          <th><!--{parseInt(i)+1}--></th>
          <td><img class="image-look" src="<!--{list[i].src}-->" data-src="<!--{list[i].src}-->" style="height: 50px;cursor: pointer;" /></td>
          <td><input type="text" class="form-control image-name-input" data-id="<!--{i}-->" placeholder="文件名称" value="<!--{list[i].title}-->" data-merchant-id="<!--{merchant_id}-->"></td>
          <td><!--{list[i].type}--></td>
          <td><!--{WangAho().byte_convert(list[i].size)}--></td>
          <td>
      		<!--if{list[i].error}-->
      			<span class="label label-danger">错误图片</span>
      		<!--else-->
      		<div class="progress" style="margin-bottom: 0;">	
          		<!--if{list[i].upload}-->
				<div class="progress-bar progress-bar-success" aria-valuemin="0" style="width: 100%;" name="image-progress" data-id="<!--{i}-->" data-merchant-id="<!--{merchant_id}-->">
			    	<span class="glyphicon glyphicon-ok"></span> 完成
				</div>
				<!--else-->
				<div class="progress-bar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;" name="image-progress" data-id="<!--{i}-->" data-merchant-id="<!--{merchant_id}-->">
				</div>
				<!--/if-->
			</div>	
      		<!--/if-->
          </td>
          <td>
          	<button type="button" name="image-delete" data-id="<!--{i}-->" data-merchant-id="<!--{merchant_id}-->" class="btn btn-default">
          		<!--if{list[i].upload}-->
          		<span class="glyphicon glyphicon-repeat"></span> 清理
          		<!--else-->
          		<span class="glyphicon glyphicon-remove"></span> 删除
          		<!--/if-->
          	</button>
          </td>
        </tr>
        <!--/for-->
        <!--else-->
        <tr>
        	<td colspan="10" style="text-align: center;">无上传图片</td>
        </tr>
        <!--/if-->
      </tbody>
    </table>

</script>






<script id="config-content" type="text/template">
	<!--helper{'action-button'}-->
	<br/><br/>
	
	<div class="form-group">
    	<label>商家ID：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_id}-->">
  	</div>
  	<div class="form-group">
    	<label>创建时间：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_insert_time) * 1000)}-->">
  	</div>
	<div class="form-group">
    	<label>商家名称：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_name}-->">
  	</div>
  	
  	<hr/>
  	<h4>用户消费赠送商家积分</h4>
  	<div class="alert alert-warning" style="margin-bottom: 10px;">
      <strong>提示!</strong> 用户在该商家消费的时候，会根据该配置将该商家积分扣除并赠送给消费的用户。
      <br/>示例，[积分比值:人民币比值] 是 2:1
      <br/>意思是用户在该商家中消费2元，则赠送4积分，则商家积分扣除4积分。
    </div>
  	<div class="form-group">
    	<label>积分比值：</label>
    	<input type="text" class="form-control" placeholder="积分比值" name="config_rmb_consume_user_credit.ratio_credit" value="<!--if{response.get.merchant_json.config_rmb_consume_user_credit.ratio_credit}--><!--{(response.get.merchant_json.config_rmb_consume_user_credit.ratio_credit/response.application_config.credit.scale).toFixed(response.application_config.credit.precision)}--><!--/if-->">
  	</div>
  	<div class="form-group">
    	<label>人民币比值（元）：</label>
    	<input type="text" class="form-control" placeholder="人民币比值" name="config_rmb_consume_user_credit.ratio_rmb" value="<!--if{response.get.merchant_json.config_rmb_consume_user_credit.ratio_rmb}--><!--{(response.get.merchant_json.config_rmb_consume_user_credit.ratio_rmb/100).toFixed(2)}--><!--/if-->">
  	</div>
  	<div class="form-group">
    	<label>运算法则：<span style="color: #999;">"round"对浮点数进行四舍五入 、"ceil"进一法取整、"floor"舍去法取整</span></label>
    	<input type="text" class="form-control" placeholder="round|ceil|floor" name="config_rmb_consume_user_credit.algorithm" value="<!--{response.get.merchant_json.config_rmb_consume_user_credit.algorithm}-->">
  	</div>
  	<div class="form-group">
    	<label>是否开启赠送：</label>
    	<label class="checkbox-inline">
			<input type="checkbox" value="1" name="config_rmb_consume_user_credit.state" <!--if{parseInt(response.get.merchant_json.config_rmb_consume_user_credit.state)}-->checked="checked"<!--/if-->> 是
		</label>
  	</div>
  	<hr/>
  	<h4>商家提现支付宝设置</h4>
  	<div class="form-group">
    	<label>支付宝提现账号：</label>
    	<input type="text" class="form-control" placeholder="支付宝提现账号" name="config_withdraw_alipay.account" value="<!--{response.get.merchant_json.config_withdraw_alipay.account}-->">
  	</div>
  	<div class="form-group">
    	<label>支付宝提现真实姓名：</label>
    	<input type="text" class="form-control" placeholder="支付宝提现真实姓名" name="config_withdraw_alipay.realname" value="<!--{response.get.merchant_json.config_withdraw_alipay.realname}-->">
  	</div>
  	
  	<hr/>
  	<h4>商家提现微信支付设置</h4>
  	<div class="form-group">
    	<label>微信提现openid：</label>
    	<input type="text" class="form-control" placeholder="微信提现openid" name="config_withdraw_weixinpay.openid" value="<!--{response.get.merchant_json.config_withdraw_weixinpay.openid}-->">
  	</div>
  	<div class="form-group">
    	<label>微信提现交易类型：<span style="color: #999;">"JSAPI"--JSAPI支付（或小程序支付）、"NATIVE"--Native支付、"APP"--app支付，"MWEB"--H5支付</span></label>
    	<input type="text" class="form-control" placeholder="JSAPI|APP|MWEB|NATIVE" name="config_withdraw_weixinpay.trade_type" value="<!--{response.get.merchant_json.config_withdraw_weixinpay.trade_type}-->">
  	</div>
  	<hr/>
  	
  	
	<br/>
  	<button type="button" class="btn btn-primary" name="config-submit">确定编辑</button>
	<hr/>
	<span style="color: #999999;">更新时间：<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_update_time) * 1000)}--></span>
	<div style="height: 100px;"></div>
</script>






<script id="type-content" type="text/template">
	<!--helper{'action-button'}-->
	<br/><br/>
	
	<div class="form-group">
    	<label>商家ID：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_id}-->">
  	</div>
  	<div class="form-group">
    	<label>创建时间：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_insert_time) * 1000)}-->">
  	</div>
	<div class="form-group">
    	<label>商家名称：</label>
    	<input type="text" class="form-control" readonly="readonly" value="<!--{response.get.merchant_name}-->">
  	</div>
  	
  	<button type="button" class="btn btn-primary" name="type-submit">确定编辑</button>
  	<br/><br/>
  	
  	<table class="table table-striped table-hover">
  	<tbody>
  	
  	<!--if{response.merchant_type_option.length}-->
	<!--for{var i in response.merchant_type_option}-->
  	
    <tr>
      <th style="width: 200px;">
      	<!--{response.merchant_type_option[i].type_name}-->
      	<!--if{parseInt(response.merchant_type_option[i].type_state)}-->
		<!--else-->
			<span style="color: red;">隐藏</span>
		<!--/if-->
      </th>
      <td>
      	
      	<!--if{response.merchant_type_option[i].son.length}-->
		<!--for{var s in response.merchant_type_option[i].son}-->
		<label class="checkbox-inline" style="margin: 0px 10px;">
			<input type="checkbox" name="type-checkbox" <!--if helper{"type in_array" (response.merchant_type_option[i].son[s].type_id, response.get.merchant_type)}-->checked="checked"<!--/if--> style="margin-left: -16px;" value="<!--{response.merchant_type_option[i].son[s].type_id}-->">
			<!--{response.merchant_type_option[i].son[s].type_name}-->
			<!--if{parseInt(response.merchant_type_option[i].son[s].type_state)}-->
			<!--else-->
			<span style="color: red;">隐藏</span>
			<!--/if-->
		</label>
		<!--/for-->
		<!--else-->
		<span style="color: #999999;margin-left: 15px;">无子选项 <a href="#/application/type/?type_parent_id=<!--{response.merchant_type_option[i].type_id}-->" class="btn btn-default btn-xs" ><span class="glyphicon glyphicon-plus"></span> 立即添加</a></span>
		<!--/if-->
      	
      </td>
    </tr>
    
    <!--/for-->
    <!--else-->
    <span style="color: #999999;margin-left: 15px;">无分类 <a href="#/shop/type_add" class="btn btn-default btn-xs" ><span class="glyphicon glyphicon-plus"></span> 立即添加</a></span>
	<!--/if-->
    
  	</tbody>
</table>  
  	
  	
  	
  	
	<hr/>
	<span style="color: #999999;">更新时间：<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.get.merchant_update_time) * 1000)}--></span>
	<div style="height: 100px;"></div>
</script>